package com.project.entity;

import com.project.util.DateUtil;

public class Task {

	private String id;
	private String name;
	private String state;
	private String cont;
	private String createtime;
	private String begintime;
	private String deadtime;
	private String level;
	private int rate = 0;
	private String userid;
	private String goalid;
	private User user;
	private Goal goal;
	public String getTime() {
		return DateUtil.getNiceDate(this.createtime);
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Goal getGoal() {
		return goal;
	}
	public void setGoal(Goal goal) {
		this.goal = goal;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	public String getGoalid() {
		return goalid;
	}
	public void setGoalid(String goalid) {
		this.goalid = goalid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	public String getDeadtime() {
		return deadtime;
	}
	public void setDeadtime(String deadtime) {
		this.deadtime = deadtime;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getCont() {
		return cont;
	}
	public void setCont(String cont) {
		this.cont = cont;
	}
	public int getRate() {
		return rate;
	}
	public void setRate(int rate){
		if(rate > 100) {
			rate = 100;
		} else if(rate < 0) {
			rate = 0;
		}
		this.rate = rate;
	}
	public void setBegintime(String begintime) {
		this.begintime = begintime;
	}
	public String getBegintime() {
		return begintime;
	}
	
}
